import request from "@/utils/request";

//医院列表
export function getPageList(current, limit, searchObj) {
  return request({
    url: `/admin/hosp/hospital/list/${current}/${limit}`,
    method: "get",
    params: searchObj
  });
}

//查询dictCode查询下级数据字典
export function findByDictCode(dictCode) {
  return request({
    url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
    method: "get"
  });
}

//根据数据id查询子数据列表
export function findChildId(id) {
  return request({
    url: `/admin/cmn/dict/findChildData/${id}`,
    method: "get"
  });
}

//更新医院上线状态
export function updateStatus(id, status) {
  return request({
    url: `/admin/hosp/hospital/updateHospStatus//${id}/${status}`,
    method: "get"
  });
}

//查看医院详情
export function getHospById(id) {
  return request({
    url: `/admin/hosp/hospital/showHospDetail/${id}`,
    method: "get"
  });
}

//查看医院科室
export function getDeptByHoscode(hoscode) {
  return request({
    url: `/admin/hosp/department/getDeptList/${hoscode}`,
    method: "get"
  });
}

//查询预约规则
export function getScheduleRule(page, limit, hoscode, depcode) {
  return request({
    url: `/admin/hosp/schedule/getScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
    method: "get"
  });
}

//查询排班详情
export function getScheduleDetail(hoscode, depcode, workDate) {
  return request({
    url: `/admin/hosp/schedule/getScheduleDetail/${hoscode}/${depcode}/${workDate}`,
    method: "get"
  });
}
